package cn.iocoder.yudao.framework.business.basic.pojo.dto;

import cn.iocoder.yudao.framework.validation.groups.CreateGroup;
import cn.iocoder.yudao.framework.validation.groups.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  数据传输对象
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/01/10
 */
@Data
public abstract class SaveDTO implements DTO {

    @Schema(description = "唯一编号，创建时不传，更新时必须传", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1")
    @Null(message = "唯一编号必须为空", groups = {CreateGroup.class})
    @NotNull(message = "唯一编号不能为空", groups = {UpdateGroup.class})
    private Long id;

}
